home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / plain / contrib / springer / cpmomu / install.bat < prev    next >
Encoding:
DOS Batch File  |  1992-07-26  |  5.1 KB  |  165 lines

  1. @echo off
  2. echo off
  3. break on
  4. cls
  5. REM  Version 1.0
  6. echo Installprogram  -  CPMONO01/CPMULT01 TeX-Macros  -  Version 1.0
  7. echo (c) Springer-Verlag GmbH & Co. KG, Heidelberg Berlin
  8. echo.
  9. if "%1"=="" goto fewparm
  10. if "%1"=="?" goto help
  11. if "%1"=="-?" goto help
  12. if "%1"=="/?" goto help
  13. if "%1"=="H" goto help
  14. if "%1"=="-H" goto help
  15. if "%1"=="/H" goto help
  16. if "%1"=="h" goto help
  17. if "%1"=="-h" goto help
  18. if "%1"=="/h" goto help
  19. if "%1"=="c" goto weiter1
  20. if "%1"=="C" goto weiter1
  21. if "%1"=="d" goto weiter1
  22. if "%1"=="D" goto weiter1
  23. goto fehler1
  24. :weiter1
  25. if "%2"=="mono" goto weiter2
  26. if "%2"=="MONO" goto weiter2
  27. if "%2"=="mult" goto weiter2
  28. if "%2"=="MULT" goto weiter2
  29. goto fehler2
  30. :weiter2
  31. set i=%instdrvpath%\
  32. if not "%i%"=="%instdrvpath%\" goto enverr
  33. if not exist %i%cp%201.ini goto fileerr
  34. if not exist %i%cpmomu01.doc goto fileerr
  35. if not exist %i%cpmomu01.ind goto fileerr
  36. if not exist %i%cpmomu01.ref goto fileerr
  37. if NOT exist %1:\nul goto diskerr0
  38. if NOT "%i%"=="\" echo Installing from [drive,directory]: %i%
  39. echo Installing onto [drive,directory]: %1:\CP%201
  40. echo.
  41. if not exist %1:\cp%201\nul goto kopiere
  42. if not exist %1:\cp%201\cp%201.ini goto kopiere
  43. :info
  44. echo Files needed for the INITEX run are already on your hard disk.
  45. echo If you wish to completely reinstall the package please abort
  46. echo by pressing ^C (CONTROL C), delete the directory
  47. echo %1:\CP%201 and start the installation procedure again.
  48. echo Otherwise press RETURN and the files on the hard disk are used.
  49. pause
  50. goto kopiert
  51. :kopiere
  52. if NOT exist %1:\cp%201\nul md %1:\cp%201
  53. if NOT exist %1:\cp%201\nul goto diskerr1
  54. copy %i%cpmomu01.ind %1:\cp%201\cpmomu01.ind > nul
  55. if not exist %1:\cp%201\cpmomu01.ind goto diskerr2
  56. echo Creating the CP%201 package. Please wait!
  57. copy %i%cp%201.ini %1:\cp%201\cp%201.ini > nul
  58. echo .
  59. copy %i%cpmomu01.doc %1:\cp%201\cpmomu01.doc > nul
  60. echo .
  61. copy %i%cpmomu01.ref %1:\cp%201\cpmomu01.ref > nul
  62. echo .
  63. copy %i%sprmindx.sty %1:\cp%201 > nul
  64. :kopiert
  65. if "%3"=="y" goto amsinst
  66. if "%3"=="Y" goto amsinst
  67. goto machtex
  68. :amsinst
  69. echo.
  70. echo Installing the AMS symbol fonts and the fraktur font.
  71. if "%i%"=="\" goto ams1
  72. :amswrodi
  73. echo It only makes sense when installing the AMS fonts from the root
  74. echo directory of the disk marked "CPMOMU01 #1" - this is not the case.
  75. echo Skipping font installation...
  76. goto machtex
  77. :ams0
  78. if "%i%"=="1" goto amswrodi
  79. echo The AMS fonts installation program is not found
  80. echo in the current drive/directory which is:
  81. CD
  82. set i=1
  83. :ams1
  84. echo Please make sure diskette marked "CPMOMU01 #1" is inserted in drive A:
  85. pause
  86. if not exist finstall.exe goto ams0
  87. finstall.exe
  88. :machtex
  89. %1:
  90. cd \cp%201
  91. echo.
  92. echo Running INITEX on %1:\cp%201\cp%201.ini
  93. echo with the command: tex cp%201.ini /i
  94. echo if this fails, please try manually.
  95. tex cp%201.ini /i
  96. goto ende
  97. :enverr
  98. echo Cannot allocate additional environmental space
  99. echo (space used by the DOS command SET),
  100. echo please enlage this space (check DOS command SHELL) and restart.
  101. goto help0
  102. :fileerr
  103. echo Files needed for the installation are not found in
  104. echo in the searched drive/directory which is:
  105. echo %i%
  106. echo Change the default drive/directory and restart.
  107. echo.
  108. if NOT "%instdrvpath%"=="" goto fileerr1
  109. echo You did not set the DOS environment variable INSTDRVPATH.
  110. :fileerr1
  111. echo If you are installing the package from an other drive/directory
  112. echo than A:\ you have to make known this to the installing procedure,
  113. echo see explanation below.
  114. goto help0
  115. :fehler1
  116. echo Drive %1 is not supported, use only C or D (without a colon)!
  117. goto help0
  118. :fehler2
  119. if "%2"=="" goto fewparm2
  120. echo Second parameter (package type): "%2" is invalid,
  121. echo choose either MONO or MULT.
  122. goto help0
  123. :diskerr0
  124. echo Cannot access drive %1:!
  125. goto help0
  126. :diskerr1
  127. echo Cannot create directory \CP%201 on drive %1:!
  128. goto help0
  129. :diskerr2
  130. echo Cannot access directory \CP%201 on drive %1:!
  131. goto help0
  132. :fewparm
  133. echo You must supply the letter of the hard drive
  134. echo where the package is to be installed on as well
  135. echo as the type of the desired package.
  136. goto help0
  137. :fewparm2
  138. echo You must specify the type of the desired package.
  139. goto help0
  140. :help0
  141. echo.
  142. echo For more help please
  143. pause
  144. :help
  145. echo.
  146. echo Usage: "INSTALL <drive> <type> [install fonts]"
  147. echo.
  148. echo       drive          use C or D to install the macros on your harddisk
  149. echo       type           specify MONO for single author books
  150. echo                      or MULT for multi author books
  151. echo       install fonts  type Y if you like to install the
  152. echo                      AMS symbol fonts and fraktur fonts,
  153. echo                      default is N = not installing the fonts
  154. echo.
  155. echo Default drive to install from is       A:
  156. echo default directory to install from is   \ (root directory)
  157. echo change this by setting the environment variable "INSTDRVPATH"
  158. echo to your convenience before calling INSTALL.
  159. echo e.g.: SET INSTDRVPATH=C:\TEMP
  160. echo Note: If you specify any drive/directory other than the default,
  161. echo       installation of the AMS fonts will not work.
  162. :ende
  163. set i=
  164. echo.
  165.